{if $number > 0}
{literal}
  <script type="text/javascript">
<!--
function confirmDelete(articleId) {
if (confirm("This will delete this site. Continue?"))
document.location = "admin.php?page=installedsites&action=delete&id=" + articleId;
}
-->
</script>
{/literal}
<h2>Installed CMScout sites</h2>
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
  <tr>
    <th class="smallhead" width="5%">Action</th>
    <th class="smallhead">Name</th>
    <th class="smallhead">Address</th>
    <th class="smallhead" width="5%">Version</th>
    <th class="smallhead">Date Installed</th>
  </tr>
{section  name=noteloop loop=$number}
  <tr>
    <td {if $sites[noteloop].outdated == 1}class="inactive"{else}class="text"{/if}><a href="javascript:confirmDelete({$sites[noteloop].id})"><img src="{$tempdir}admin/images/delete.gif" border="0" alt="Delete {$sites[noteloop].name}" title="Delete {$sites[noteloop].name}" /></a></td>
    <td {if $sites[noteloop].outdated == 1}class="inactive"{else}class="text"{/if}><div align="left">{if $sites[noteloop].active == 1}<img src="{$tempdir}admin/images/unpublish.png" border="0" alt="Site Active" title="Site Active" />{else}<img src="{$tempdir}admin/images/publish.png" border="0" alt="Site Unreachable" title="Site Unreachable" />{/if}&nbsp;{$sites[noteloop].name}</div></td>
    <td {if $sites[noteloop].outdated == 1}class="inactive"{else}class="text"{/if}><div align="left"><a href="{$sites[noteloop].address}">{$sites[noteloop].address}</a></div></td>
    <td {if $sites[noteloop].outdated == 1}class="inactive"{else}class="text"{/if}>{$sites[noteloop].version}</td>
    <td {if $sites[noteloop].outdated == 1}class="inactive"{else}class="text"{/if}>{$sites[noteloop].date+$timeoffset|date_format:"%B %e, %Y %H:%M"}</td>
  </tr>
{/section}
</table>
<a href="admin/update.php">Update</a>
{else}
<div align="center">No Sites</div>
{/if}